﻿<Page x:Class="EffectsTester.Pages.Sepia"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:fx="http://LearnWPF.com/Effects"
    xmlns:local="clr-namespace:EffectsTester"
      Title="Sepia">
    <Grid>
        <Border>
            <Border.Effect>
                <fx:SepiaEffect DesaturationFactor="{Binding ElementName=desatFactor, Path=Value}" Toned="{Binding ElementName=toneFactor, Path=Value}" LightColor="{Binding ElementName=lightColorBrush, Path=Color}" DarkColor="{Binding ElementName=darkColorBrush, Path=Color}" />
            </Border.Effect>
            <local:TestControl />
        </Border>
        <StackPanel>
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="Desaturation: " />
            <Slider x:Name="desatFactor" Minimum="0" Maximum="1" Width="100" />
        </StackPanel>
        <StackPanel Orientation="Horizontal">
                <TextBlock Text="Tone: " />
                <Slider x:Name="toneFactor" Minimum="0" Maximum="1" Width="100" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Light Color: " />
                <Rectangle Width="50" x:Name="lightColor" Stroke="Black" StrokeThickness="2">
                    <Rectangle.Fill>
                        <SolidColorBrush x:Name="lightColorBrush" Color="GhostWhite"/>
                    </Rectangle.Fill>
                </Rectangle>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Dark Color: " />
                <Rectangle Width="50" x:Name="darkColor" Stroke="Black" StrokeThickness="2">
                    <Rectangle.Fill>
                        <SolidColorBrush x:Name="darkColorBrush" Color="SaddleBrown" />
                    </Rectangle.Fill>
                </Rectangle>
            </StackPanel>
        </StackPanel>
        
    </Grid>
</Page>
